#http://www.cqie.edu.cn/
import requests
import csv
from lxml import etree
head={'User-Agent':
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36'}
def get_html(url):
    try:
        r=requests.get(url=url,headers=head)
        r.encoding=r.apparent_encoding
        r.raise_for_status()
        return r.text
    except Exception as o:
        print(o)
def parser(html):
    doc=etree.HTML(html)
    out_list=[]
    for row in doc.xpath('//*[@id="colR"]/div[2]/dl/dd/ul/li'):

def save_csv(itme,path):
    with open(path,'a+',newline='',encoding='utf-8')as f:
        csv_write=csv.writer(f)
        csv_write.writerows(itme)
if __name__ == '__main__':
    url='http://www.cqie.edu.cn/'


